package tests;

import static org.junit.Assert.assertEquals;
import model.components.ComponentDoor;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import utils.Constants;
import controller.FakeNetwork;

public class ComponentDoorTest {

	protected ComponentDoor cd;

	@Before
	public void setUp() throws Exception {
		FakeNetwork fnet = new FakeNetwork();
		cd = new ComponentDoor("Door 1", Constants.COMPONENT_DOOR_CLOSED);
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testIsOpenedFalse() {
		cd.setOpened(false);
		assertEquals((boolean) false, cd.isOpened());
	}

	@Test
	public void testIsOpenedTrue() {
		cd.setOpened(true);
		assertEquals((boolean) true, cd.isOpened());
	}

}
